import request from '@/utils/request'

enum API {
  //一级分类的
  C1_URL = '/admin/product/getCategory1',
  //二级分类的
  C2_URL = '/admin/product/getCategory2/',
  //三级分类的
  C3_URL = '/admin/product/getCategory3/',
}
//一级分类的接口
export const reqC1 = () => request.get<any, any>(API.C1_URL)
//二级分类的接口
export const reqC2 = (category1Id: number|string) =>
  request.get<any, any>(API.C2_URL + category1Id)
//三级分类的接口
export const reqC3 = (category2Id: number|string) =>
  request.get<any, any>(API.C3_URL + category2Id)
